Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.4] Android: Only warn when Target SDK is non default #62609

Merged

Conversation

akien-mga
Copy link
Member

The validation logic for Min Sdk and Target Sdk was flawed as it triggers
errors for users not using Custom Build even if they never modified the
values themselves.

The default values for those settings get saved in export_presets.cfg and
thus the error gets triggered when moving from 3.4.4 or earlier to 3.4.5, as
the target SDK changed from 30 to 31.

So instead we just raise a warning to make users aware of this non-default
Min Sdk or mostly Target Sdk that might be in their preset.

We also warn when they do use Custom Build as the target SDK 30 would likely
still be an upgrade issue and not an intentional choice, especially given
that Google Play will now require SDK 31.

The export info dialog is now exclusive so that when it doesn't auto-close,
i.e. when it errors, you don't close it by mistake by clicking outside.

The valid range for both options is no longer limited to Godot's own default
target SDK, but can accept higher values (they are not guaranteed to work,
but they might).

@akien-mga
Copy link
Member Author

akien-mga commented Jul 3, 2022

I updated this PR to use r_err to pass warnings (without setting valid = false;). So I reworded them a bit to make them more concise as we're more constrained on string length. They're still with a line break so they will show as two warnings each, but given that it's just a hack to provide users with relevant info on upgrade to 3.4.5, I think it's fine. I used >> on the second line to convey that it's a continuation of the first line.

Edit: Wait, the warning system doesn't work in 3.4.

Edit 2: Backported relevant part of #51550 that added support for displaying warnings.

image
image
image

The validation logic for Min Sdk and Target Sdk was flawed as it triggers
errors for users not using Custom Build even if they never modified the
values themselves.

The default values for those settings get saved in `export_presets.cfg` and
thus the error gets triggered when moving from 3.4.4 or earlier to 3.4.5, as
the target SDK changed from 30 to 31.

So instead we just show a warning to make users aware of this non-default
Min Sdk or mostly Target Sdk that might be in their preset.

We also warn when they do use Custom Build as the target SDK 30 would likely
still be an upgrade issue and not an intentional choice, especially given
that Google Play will now require SDK 31.

The export info dialog is now exclusive so that when it doesn't auto-close,
i.e. when it errors, you don't close it by mistake by clicking outside.

The valid range for both options is no longer limited to Godot's own default
target SDK, but can accept higher values (they are not guaranteed to work,
but they might).

To be able to display warning, the relevant code is backported from 30ee208.

Fixes godotengine#62465 without breaking compatibility for 3.4.5.
@akien-mga akien-mga force-pushed the 3.4-android-preset-target-sdk-warning branch from 5fa6b90 to 431558d Compare July 3, 2022 15:44
@akien-mga akien-mga merged commit 59ae873 into godotengine:3.4 Jul 3, 2022
@akien-mga akien-mga deleted the 3.4-android-preset-target-sdk-warning branch July 3, 2022 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant